class RechargeInfoM {
  RechargeInfoM({
      this.activityId, 
      this.rechargeList, 
      this.giftAmountList, 
      this.giftCouponList, 
      this.startTime, 
      this.endTime, 
      this.type, 
      this.relatedArticleId,});

  RechargeInfoM.fromJson(dynamic json) {
    activityId = json['activity_id'];
    rechargeList = json['recharge_list'] != null ? json['recharge_list'].cast<num>() : [];
    giftAmountList = json['gift_amount_list'] != null ? json['gift_amount_list'].cast<num>() : [];
    if (json['gift_coupon_list'] != null) {
      giftCouponList = [];
      json['gift_coupon_list'].forEach((v) {
        giftCouponList?.add(GiftCouponList.fromJson(v));
      });
    }
    startTime = json['start_time'];
    endTime = json['end_time'];
    type = json['type'];
    relatedArticleId = json['related_article_id'];
  }
  num? activityId;
  List<num>? rechargeList;
  List<num>? giftAmountList;
  /// 购买送券活动
  List<GiftCouponList>? giftCouponList;
  num? startTime;
  num? endTime;
  num? type;
  num? relatedArticleId;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['activity_id'] = activityId;
    map['recharge_list'] = rechargeList;
    map['gift_amount_list'] = giftAmountList;
    if (giftCouponList != null) {
      map['gift_coupon_list'] = giftCouponList?.map((v) => v.toJson()).toList();
    }
    map['start_time'] = startTime;
    map['end_time'] = endTime;
    map['type'] = type;
    map['related_article_id'] = relatedArticleId;
    return map;
  }

}

/// 购买送券活动
class GiftCouponList {
  GiftCouponList({
    this.couponId,
    this.name,
    this.nu,});

  GiftCouponList.fromJson(dynamic json) {
    couponId = json['coupon_id'];
    name = json['name'];
    nu = json['num'];
  }
  String? couponId;
  String? name;
  num? nu;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['coupon_id'] = couponId;
    map['name'] = name;
    map['num'] = nu;
    return map;
  }

}